#include<iostream>
class Test // final:不允许被继承 最终类
{
    public:
    Test()=default;//按默认方式构建函数
    Test(int a){};
    virtual void show()
    {
        std::cout<<"test"<<std::endl;
    }

};

class Derived:public Test
{
public:
    void show() override //只能描述重写父类的虚函数
    {
        std::cout<<"derived"<<std::endl;
    }
};


int main()
{
    Test*t=new Derived;
    t->show();

    return 0;
}